import trimesh
from jxq.group import *
from OCC.Display.SimpleGui import init_display
from .jxq.path_generator import *

display, start_display, add_menu, add_function_to_menu = init_display("wx")
group = Body('groupgcy', group_dir=r'D:\Pycharm_Project\new_part\29-02', part_dir=r'D:\Pycharm_Project\new_part\29-02')

# # 平移
# print(group.get_point('V_63_1_A90_T12_TUENKERS.1/AP-01-B-01'))
# group.apply_translation([100, 0, 0])
# print(group.get_point('V_63_1_A90_T12_TUENKERS.1/AP-01-B-01'))
# # 旋转
# AXIS_X = (np.array([0, 0, 0], dtype=float), np.array([1, 0, 0], dtype=float))
# AXIS_Y = (np.array([0, 0, 0], dtype=float), np.array([0, 1, 0], dtype=float))
# AXIS_Z = (np.array([0, 0, 0], dtype=float), np.array([0, 0, 1], dtype=float))
# ratate_mat = rotation_matrix(
#     np.deg2rad(90),
#     AXIS_X[1],
#     AXIS_X[0]
# )
# group.add_transform(['V_63_1_A90_T12_TUENKERS.1', 'DO-001-A-02-BRACKET.1'], ratate_mat)
# print(group.get_point('V_63_1_A90_T12_TUENKERS.1/AP-01-B-01'))
#
# 该trimesh了

display.DisplayShape(group.compound(), update=True)
start_display()
